package com.bridgeintelligent.tag.bulkload.service.core;

import com.bridgeintelligent.tag.bulkload.service.core.cache.InitCache;
import com.wayneleo.quickstart.framework.BaseResponse;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author JackCheung
 * @date 2020/6/3 4:02 PM.
 * description:
 */
@AllArgsConstructor
@RestController
@RequestMapping(value = "/bulkLoad")
public class RefreshCacheController {

    private InitCache initCache;

    @GetMapping("/refresh")
    public BaseResponse delIndex() {
        initCache.run();
        BaseResponse result = new BaseResponse();
        result.setCode(0);
        return result;
    }
}
